package hz.mobileproject.pda.ui.activity.work;

import android.app.Activity;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.view.View;


import com.blankj.utilcode.util.SPUtils;
import com.blankj.utilcode.util.TimeUtils;

import cn.droidlover.xdroidmvp.mvp.XActivity;
import cn.droidlover.xdroidmvp.router.Router;
import hz.mobileproject.pda.R;
import hz.mobileproject.pda.broadcast.IShowBarcodeStr;
import hz.mobileproject.pda.entity.request.Request_Edu;
import hz.mobileproject.pda.listener.ICommonV;
import hz.mobileproject.pda.presenter.PEdu;

public class Edu_dept_Activity extends XActivity<PEdu> implements ICommonV  {


    private RecyclerView re;

    public static void launch(Activity activity) {
        Router.newIntent(activity)
                .to(Edu_dept_Activity.class)
                .launch();
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        re=(RecyclerView)findViewById(R.id.my_recycler_view);

    }

    @Override
    public void onWidgetClick(View view) {

    }

    //2.1.12	查询本部门所有教育谈话
    @Override
    public void initData(Bundle savedInstanceState) {


        SPUtils spUtils = SPUtils.getInstance("app_login");
        String cusnumber=spUtils.getString("cusnumber");
        String department_id=spUtils.getString("department_id");

        Request_Edu edu = new Request_Edu();
        edu.setQueryTime(TimeUtils.getNowString());
        edu.setQueryDept(cusnumber);
        edu.setCusNumber(department_id);
        edu.setQueryPage("1");

        getP().loadData(edu,1,this);
    }

    @Override
    public int getLayoutId() {
        return R.layout.activity_edu_dept;
    }

    @Override
    public PEdu newP() {
        return new PEdu(this);
    }

    @Override
    public void showError(Exception e) {

    }

    @Override
    public void showData(String s, int type) {

    }


}
